package com.design.pattern.state;

public class NoQuarterState implements State {

    GumballMachine gumballMachine;

    public NoQuarterState(GumballMachine gumballMachine) {
        this.gumballMachine = gumballMachine;
    }

    public void insertQuarter() {
        System.out.println("你投入了钱币");
        gumballMachine.setState(gumballMachine.getHasQuarterState());
    }

    public void ejectQuarter() {
        System.out.println("你还没有投入钱币，找什么钱");
    }

    public void turnCrank() {
        System.out.println("你还没给钱，摇动摇杆也没用");
    }

    public void dispense() {
        System.out.println("你还没给钱，要什么糖果");
    }
}